package com.fortune.dto.in.ClientRegistered;

import com.fortune.constants.PatternConstants;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;

public class ClientRegisteredDto {
    @Pattern(regexp= PatternConstants.PHONE, message="手机号格式错误")
    @ApiModelProperty(required=true, example="手机号码")
    private String phone;
    @Pattern(regexp=PatternConstants.PASSWORD, message="密码格式错误")
    @ApiModelProperty(required=true, example="密码")
    private String password;
    @NotBlank(message="客户名称不能为空")
    @ApiModelProperty(example="客户名称")
    private String clientName;
    @NotBlank(message="客户简称不能为空")
    @ApiModelProperty(example="客户简称")
    private String abbreviation;
    @NotBlank(message="联系人名称不能为空")
    @ApiModelProperty(example="联系人名称")
    private String contactsName;
    @NotBlank(message="客户地址不能为空")
    @ApiModelProperty(example="客户地址")
    private String clientAddress;

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getClientName() {
        return clientName;
    }

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public String getAbbreviation() {
        return abbreviation;
    }

    public void setAbbreviation(String abbreviation) {
        this.abbreviation = abbreviation;
    }

    public String getContactsName() {
        return contactsName;
    }

    public void setContactsName(String contactsName) {
        this.contactsName = contactsName;
    }

    public String getClientAddress() {
        return clientAddress;
    }

    public void setClientAddress(String clientAddress) {
        this.clientAddress = clientAddress;
    }


    @Override
    public String toString() {
        return "ClientRegisteredDto{" +
                "phone='" + phone + '\'' +
                ", password='" + password + '\'' +
                ", clientName='" + clientName + '\'' +
                ", abbreviation='" + abbreviation + '\'' +
                ", contactsName='" + contactsName + '\'' +
                ", clientAddress='" + clientAddress + '\'' +
                '}';
    }
}
